﻿namespace ZyGame
{
    public sealed class StringVarable : Varable<string>
    {
        public StringVarable(string value)
        {
            this.value = value;
        }

        public static implicit operator string(StringVarable varable)
        {
            return varable.value;
        }

        public static explicit operator StringVarable(string varable)
        {
            return new StringVarable(varable);
        }

        public static StringVarable operator +(StringVarable left, StringVarable right)
        {
            left.value += right.value;
            return left;
        }

        public static StringVarable operator -(StringVarable left, StringVarable right)
        {
            left.value = left.value.Replace(right, "");
            return left;
        }

        public static bool operator ==(StringVarable left, StringVarable right)
        {
            return left.value == right.value;
        }

        public static bool operator !=(StringVarable left, StringVarable right)
        {
            return left.value != right.value;
        }
    }
}
